import request from '@/utils/request'
// 获取权限列表
export const getPermissionListApi = () => request({
  url: '/sys/permission'
})

// 新增权限
export const addPermissionApi = data => request({
  method: 'post',
  url: '/sys/permission',
  data
})
// 编辑权限
export const updatePermissionApi = data => request({
  url: `/sys/permission/${data.id}`,
  method: 'put',
  data
})
// 删除权限
export function delPermissionApi(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}
// 获取权限详情
export function getPermissionDetailApi(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}
